<template>
   <div class="common-layout">
    <el-container>
      <el-aside width="200px">
          <el-menu
        active-text-color="#ffd04b"
        background-color="#545c64"
        class="el-menu-vertical-demo"
        default-active="/user12345"
        text-color="#fff"
        router
      >
       <!-- <el-menu-item v-for="ele in $store.state.arr" :key="ele.name" :index="ele.path">{{ele.meta.title}}</el-menu-item> -->

          <el-menu-item-group  v-for="ele in $store.state.arr" :key="ele.name" :index="ele.path">
            <el-menu-item :index="ele.path">{{ele.meta.title}}</el-menu-item>
           
          </el-menu-item-group>
      </el-menu>
      </el-aside>
      <el-container>
        <el-header> vue3  后台管理</el-header>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script setup>
import {
  ref,
  reactive,
  toRefs,
  computed,
  watch,
  getCurrentInstance,
  onMounted,
} from "vue";
import { useRoute, useRouter } from "vue-router";
import { useStore } from "vuex";
import About from "@/views/About.vue";
const store =useStore()


</script>

<style>
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    height: 100vh;
  }
  
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
  height: 98vh;
  }
  
</style>